Revert "pango: Handle case where pango_layout_get_text() returns NULL"
authorBenjamin Otte <otte@redhat.com>
Mon, 9 Sep 2013 15:19:28 +0000 (17:19 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 9 Sep 2013 15:19:28 +0000 (17:19 +0200)
This reverts commit 70ac2b24c3d400c854d8a9e0937afa076f9dbe7f.

It turns out the correct fix is to make pango_layout_get_text() not
return NULL. This has been done, so we can drop this patch.

I won't bump the Pango dependency in configure.ac for this as I don't
consider the crash critical enough.

gtk/gtkpango.c

index ea688eaf8d458f5e0e2c2176defe37c988536a9f..40c94f3c13c05ac8a29a1129104f64d22ec37476 100644 (file)
@@ -1014,7 +1014,7 @@ _gtk_pango_get_text_before (PangoLayout     *layout,
 
   text = pango_layout_get_text (layout);
 
-  if (text == NULL || text[0] == 0)
+  if (text[0] == 0)
     {
       *start_offset = 0;
       *end_offset = 0;
@@ -1115,7 +1115,7 @@ _gtk_pango_get_text_after (PangoLayout     *layout,
 
   text = pango_layout_get_text (layout);
 
-  if (text == NULL || text[0] == 0)
+  if (text[0] == 0)
     {
       *start_offset = 0;
       *end_offset = 0;
@@ -1222,7 +1222,7 @@ _gtk_pango_get_text_at (PangoLayout     *layout,
 
   text = pango_layout_get_text (layout);
 
-  if (text == NULL || text[0] == 0)
+  if (text[0] == 0)
     {
       *start_offset = 0;
       *end_offset = 0;